package models

import (
	"github.com/astaxie/beego/orm"
	"time"
)

type Record struct {
	Id         int64
	Content    string        `ht:"list;search;name(内容)"  valid:"Required;"`
	RecordType int        `ht:"list;name(记录类型);subclass([{\"Num\":1,\"Name\":\"用户修改记录\"},{\"Num\":2,\"Name\":\"用户上传\"}])"`
	RecordTime time.Time        `ht:"list;name(记录时间);defaultvalue(time.Now())"`
	Status     int                `ht:"name(状态);status([{\"Num\":0,\"Name\":\"未读\"},{\"Num\":1,\"Name\":\"已读\"}])"`
	UserId     int                `ht:"list;name(用户Id)"`
}

func init() {
	orm.RegisterModel(new(Record))
}
func (*Record)TableName() string {
	return "record"
}
func (*Record) FN_Id() string {
	return "Id"
}
func (*Record) FN_Content() string {
	return "Content"
}
func (*Record) FN_RecordType() string {
	return "RecordType"
}
func (*Record) FN_Status() string {
	return "Status"
}
func (*Record) FN_UserId() string {
	return "UserId"
}
func (*Record) FN_Type() string {
	return "Type"
}